<template>
    <div class="nav">
        <van-grid column-num="5" icon-size="35" clickable :border="false">
            <van-grid-item class="temp" v-for="item in gridList" :key="item.id" :icon="item.url" :text="item.text"
                @click="handleGriditemClick(item.id)" />
        </van-grid>
    </div>

</template>

<script setup lang="ts">
// 实现nav  
import { ref, computed, onMounted, Ref } from 'vue';

import { useHomeNav } from '@/hooks/useListItem'
const { nav, changeNav } = useHomeNav()
const gridList: any = ref([])
onMounted(() => {
    gridList.value = nav
})
const handleGriditemClick = (id: any) => {
    changeNav(id)
}


</script>

<style scoped lang="scss">

</style>